package cn.zl.api.dto.user;

import cn.yunbamboos.rest.service.dto.in.GenericInDTO;
import com.alibaba.fastjson2.JSONObject;
import jakarta.validation.constraints.NotNull;

public class ResetUserPasswordInDTO extends GenericInDTO {

    @NotNull(message = "用户ID不能为空")
    private long userId;
    @NotNull(message = "用户密码不能为空")
    private String password;

    @Override
    public void decode(JSONObject json) {
        super.decode(json);
        this.userId = this.getLong(json,"user_id");
        this.password = this.getString(json,"password");
    }

    public long getUserId() {
        return userId;
    }

    public String getPassword() {
        return password;
    }
}
